package com.light.gulimall.product.feign;

import com.light.common.dto.savespuinfo.SaveSpuInfoDTO;
import com.light.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 远程调用coupon模块
 */
@FeignClient(name = "gulimall-product", url = "http://localhost:88")
public interface CouponRemoteServiceClient {

    /**
     * 调用coupon模块 保存积分优惠相关信息
     * @param skuInfo product模块传递信息
     * @return  是否成功
     */
    @RequestMapping("/api/coupon/coupon/skuInfo/saveCoupon")
    R saveCouponReleaseInfo(@RequestBody SaveSpuInfoDTO skuInfo);

    @RequestMapping("/api/coupon/coupon/test")
    String testCouponRemote();
}
